﻿<UserControl x:Class="Hisaab.Windows.Client.View.Login"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Common="clr-namespace:Hisaab.Windows.Common;assembly=Hisaab.Windows.Common"
             xmlns:conv="clr-namespace:Hisaab.Windows.Client.Converters"
             mc:Ignorable="d" Height="461" Width="552" Foreground="White" BorderBrush="Black" BorderThickness="1">
    <UserControl.Resources>
        <conv:VisibleToBoolConverter x:Key="VisibilityConverter" />
    </UserControl.Resources>
    <Canvas x:Name="MainGrid" Margin="0" Background="White" Width="549">
        <Image Source="/Hisaab;component/Images/Splash.jpg" Stretch="None" />
        <Label Target="{Binding ElementName=Username}" Foreground="#FF1F2C76" FontWeight="Bold" Content="_Username" Height="30" Canvas.Top="316" Width="75" Canvas.Left="47" Background="{x:Null}"/>
        <TextBox x:Name="Username" Text="{Binding User.Username, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Common:FocusBehavior.IsFocused="True"
                 Height="26" Canvas.Left="119" Margin="0" Canvas.Top="316" Width="210" Background="#00000000" BorderBrush="#FF4B82B4" BorderThickness="2" Foreground="#FF135EA1" />
        <Label Target="{Binding ElementName=Password}" Foreground="#FF1F2C76" FontWeight="Bold" Content="_Password" Height="30" Canvas.Top="346" Width="75" Canvas.Left="47" Background="{x:Null}"/>
        <PasswordBox Common:PasswordHelper.Password="{Binding User.Password, Mode=TwoWay}" Height="26" Canvas.Left="119" Canvas.Top="346" Width="210" Background="#00000000" BorderBrush="#FF4B82B4" BorderThickness="2" />
        <Button Command="{Binding OkCommand}" CommandParameter="{Binding User}" Margin="0" Width="102" Content="Login" Height="27" Canvas.Left="119" Canvas.Top="384"  IsDefault="True" />
        <Button Command="{Binding CancelCommand}" CommandParameter="{Binding User}" Margin="0" Content="Cancel" Height="27" Canvas.Left="227" Canvas.Top="384" Width="102" IsCancel="True" />
        <Label Canvas.Left="244" Canvas.Top="113" Content="Hisaab" Height="88" Name="label1" FontSize="64" Width="211" Foreground="#FF135EA1" />
        <Label Canvas.Left="12" Canvas.Top="431" Content="(c) 2011 Umer Farooq. All Rights Reserved." Height="27" Name="label2" Width="445" Foreground="#FF135EA1" />
        <Label Canvas.Left="346" Canvas.Top="316" Content="{Binding Error}" Height="60" Name="label3" Foreground="Red" FontWeight="Bold" Width="189" Visibility="{Binding ShowError, Converter={StaticResource VisibilityConverter}}" />
        <Label Canvas.Left="244" Canvas.Top="189" Height="28" Name="label4" FontSize="15" FontWeight="Bold" Foreground="#FFC1C1C1" Content="{Binding Version}" Width="200" HorizontalContentAlignment="Right" />
    </Canvas>
</UserControl>